package com.example.educational.controller.utils;

//自定义异常处理器，用于封装异常信息，对异常进行分类
public class SystemException extends RuntimeException {
    private String code;

    public SystemException(String code, String message) {
        super(message);
        this.code = code;
    }

    // Throwable为异常报错的对象
    public SystemException(String code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
